<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout :: common_header(~{::title})">
    <title> [[${pageTitle}]] - [[${T(com.b2c.erp.DataConfigObject).getInstance().getSysName()}]]</title>
</head>
<body th:replace="layout :: common_body(~{::div.layui-body})">

<div class="layui-body" style="padding:15px;">
   

    <!-- content starts -->
    <!--    <blockquote class="layui-elem-quote"></blockquote>-->

    <fieldset class="layui-elem-field">
        <legend>按条件搜索</legend>
        <div class="layui-field-box">
            <form class="layui-form layui-form-pane1" method="get" action="/funds/marketing_costs_list_pdd">
                <div class="layui-form-item">
                    <div class="layui-inline">

                        <div class="layui-input-inline">
                            <select name="shopId" id="shopId">
                                <option value="">店铺</option>
                                <option  th:each="item: ${shops}" th:text="${item.name}" th:value="${item.id}"></option>
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" name="startDate" id="startDate"
                                   placeholder="yyyy-MM-dd" autocomplete="off" th:value="${startDate}">
                        </div>
                        
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" name="endDate" id="endDate"
                                   placeholder="yyyy-MM-dd" autocomplete="off" th:value="${endDate}">
                        </div>

                    </div>
                    <div class="layui-inline">
                        <button type="submit" class="layui-btn">搜索</button>
                        <i>总共：&nbsp;[[${totalSize}]]&nbsp;条记录</i>
                    </div>
                    <div class="layui-inline"></div>
             
                    <div class="layui-inline">
                        <a class="layui-btn layui-btn-normal" href="/funds/marketing_costs_list_pdd_import">导入pdd营销费用数据</a>
                    </div>
                </div>
            </form>

        </div>
    </fieldset>

    <!-- start dd-wrapper -->
    <link rel="stylesheet" href="/css/order.css"/>
    <link rel="stylesheet" href="/sb/stock.css"/>
    <div class="dd-wrapper">
        <div class="sp-table">
            <table>
                <thead>
                <tr>
                    <th>发生日期</th>
                    <th>交易金额</th>
                    <th>流水类型</th>
                    <th>资金类型</th>
                    <th>余额</th>
                    <th>摘要</th>


                   
                </tr>
                </thead>
                <tbody id="sp-data">

                <tr th:each="item:${lists}">

                    <td><b th:text="${item.datetime}"></b></td>
                    <td th:text="${item.amount}"></td>
                    <td >
                        <b th:if="${item.type == 1}">支出</b>
                        <b th:if="${item.type == 2}">收入</b>
                    </td>
                    <td th:text="${item.zjtype}"></td>
                    
                    <td th:text="${item.balance}"></td>
                    
                    <td th:text="${item.remark}"></td>

                   
                </tr>
                </tbody>
            </table>
            <div class="layui-box layui-laypage layui-laypage-default pageBox">
                <paging:pager th:value="${pageIndex}" th:rows="${totalSize}" th:size="${pageSize}"/>
            </div>
        </div>



    </div>
    <!-- end dd-wrapper -->


    <script src="/js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript">
        layui.use(['laydate', 'layer','form'], function () {
            var laydate = layui.laydate;
            var form = layui.form;
            laydate.render({
                elem: '#startDate'
                // type:'month'
            });
            laydate.render({
                elem: '#endDate'
                // type:'month'
            });
            $("#shopId").val('[[${shopId}]]');
            form.render('select'); //刷新select选择框渲染

        });
        var r = /^\+?[1-9][0-9]*$/;
        $(function () {




        });
    </script>
</div>


</body>
<html>
